# coding:utf-8

# token 有效时长(2周)
TOKEN_TIMEOUT = 60 * 60 * 24 * 14

# App token 时长为一年
APP_TOKEN_TIMEOUT = 60 * 60 * 24 * 30

# 打折信息
PACK_SET_INFO = {
    'discount': 95,  # 供前端渲染成95折
    'deadline': '2020-01-01'
}

# 草稿留电设备信息种cookies
DRAFT_DEVICE_COOKIES_INFO = {
    'key': 'liudian_device',
    'expires': 60 * 60 * 24 * 7,  # 1周
    'max': 3    # 一周最多允许提交3个电话号码
}


class OpType(object):
    """
    create by ld_wu 2017-09-05
    更新地域范围的操作类型
    """
    ALL = 1         # 关注全国
    REMOVE = 2      # 移除某省关注
    UPDATE = 3      # 更新省内城市关注
    MUNICIPAL = 4   # 直辖市更新

# 直辖市编码集合
MUNICIPAL_CODE = {
    110100,
    120100,
    310100,
    500100,
    810100,
    820100
}

MAX_RATE = 30
MIN_RATE = 17


class IsSelf(object):
    """
    是否自行供货
    """
    NO = 0    # 否
    YES = 1   # 是


KF_VIRTUAL_NUM_CACHE_KEY = 'kf_virtual_num'

KF_PHONE_LIST = [
    '075536567107'
]

# 独家锁定所需支付汇币
LOCKED_PAID_BID_POINT = 200

# 铜牌一口价折扣
BRONZE_PAID_DISCOUNT = 0.85


class BtnType(object):
    """
    按钮类型
    """
    ATTEND = 1       # 立即关注按钮
    BID = 2          # 抢单按钮


class EnterpriseDispatchQueryType(object):
    """
    created by chenhj at 2018/8/9
    企业派单查询类型
    """
    THIS_WEEK = 1
    THIS_MONTH = 2
    LAST_MONTH = 3
    SELF = 4
